Skip to content

GafferUI : Fix local documentation links on Windows - #7134

Open
pascalandr wants to merge 1 commit into
GafferHQ:mainfrom
pascalandr:fix/windows-local-documentation-links
Open

GafferUI : Fix local documentation links on Windows#7134
pascalandr wants to merge 1 commit into
GafferHQ:mainfrom
pascalandr:fix/windows-local-documentation-links

Conversation

@pascalandr

Copy link
Copy Markdown

Fixes local documentation links such as Help > User Guide and Help > Node Reference on Windows.

showURL() currently strips the file:// prefix and passes the resulting drive-letter path to QUrl. Qt interprets the drive letter as the URL scheme (c:), so QDesktopServices does not open the local HTML file. This change uses QUrl.fromLocalFile() for that Windows-specific branch.

  • Preserve the existing removal of URL fragments on Windows.
  • Preserve existing web URL handling.
  • Add coverage for HTTPS URLs and Windows local file URLs containing spaces and fragments.

Related issues

  • None.

Dependencies

  • None.

Breaking changes

  • None.

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable. No documentation change is required.
  • I have tested my changes and added a regression test.
  • My code follows the project's prevailing style and conventions.

Testing

Validated with the Qt bindings shipped in Gaffer 1.7.1.0 on Windows. The resulting URL uses the file scheme, reports isLocalFile() == True, preserves paths containing spaces, and strips the unsupported fragment. HTTPS URL handling is unchanged.

The full repository test suite was not run because this checkout has no compiled build; the targeted behavior and Python syntax were tested against the installed Gaffer 1.7.1.0 runtime.

@johnhaddon
johnhaddon requested a review from ericmehl September 3, 2026 07:59
@ericmehl

ericmehl commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Hi @pascalandr, I see from tag on the PR this is your first Gaffer contribution, welcome!

I'm curious about the reproduction steps that led to broken documentation links. All of the help links are working fine for me using Gaffer 1.7.1.0, Windows 11 and either Firefox or Microsoft Edge.

Is there another configuration where the links are not working?

@pascalandr

pascalandr commented Sep 9, 2026

Copy link
Copy Markdown
Author

Hi @ericmehl , thanks for checking. I tracked this down to spaces in the installation path. With stock Gaffer 1.7.1.0 on Windows 11:

  • C:\Program Files\gaffer-1.7.1.0-windows fails with ShellExecute ... failed (error 2).
  • The same build under C:\software\gaffer-1.7.1.0-windows works.

QUrl.fromLocalFile() fixes the Program Files case. Could you confirm the path you tested from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants